﻿<Page:BasePage
    xmlns:Page="clr-namespace:Tfs.OnTheRoad.Pages"
    xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
	xmlns:controls="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls"
	xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:Controls="clr-namespace:Tfs.OnTheRoad.Controls"
	mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="768"
	x:Class="Tfs_OnTheRoad.WorkItemsOverviewPage"
	FontFamily="{StaticResource PhoneFontFamilyNormal}"
	FontSize="{StaticResource PhoneFontSizeNormal}"
	Foreground="{StaticResource PhoneForegroundBrush}"
	SupportedOrientations="Portrait" Orientation="Portrait" ApplicationBarButtons="Refresh,About,Back" 
	shell:SystemTray.IsVisible="True">
    <!--Enabling Page Transitions-->
    <toolkit:TransitionService.NavigationInTransition>
        <toolkit:NavigationInTransition>
            <toolkit:NavigationInTransition.Backward>
                <toolkit:TurnstileTransition Mode="BackwardIn"/>
            </toolkit:NavigationInTransition.Backward>
            <toolkit:NavigationInTransition.Forward>
                <toolkit:TurnstileTransition Mode="ForwardIn"/>
            </toolkit:NavigationInTransition.Forward>
        </toolkit:NavigationInTransition>
    </toolkit:TransitionService.NavigationInTransition>
    <toolkit:TransitionService.NavigationOutTransition>
        <toolkit:NavigationOutTransition>
            <toolkit:NavigationOutTransition.Backward>
                <toolkit:TurnstileTransition Mode="BackwardOut"/>
            </toolkit:NavigationOutTransition.Backward>
            <toolkit:NavigationOutTransition.Forward>
                <toolkit:TurnstileTransition Mode="ForwardOut"/>
            </toolkit:NavigationOutTransition.Forward>
        </toolkit:NavigationOutTransition>
    </toolkit:TransitionService.NavigationOutTransition>

    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot" Background="Transparent">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"></RowDefinition>
            <RowDefinition Height="*"></RowDefinition>
        </Grid.RowDefinitions>
        <Controls:HeaderControl Margin="0" NavigationPath="{Binding PageTitle}" Grid.Row="0"></Controls:HeaderControl>
        <!--Pivot Control-->
        <controls:Pivot x:Name="PivotControl" Grid.Row="1" ItemsSource="{Binding WorkItemTypes}" LoadingPivotItem="Pivot_LoadingPivotItem" >
            <controls:Pivot.HeaderTemplate>
                <DataTemplate>
                    <Grid x:Name="grid">
                        <TextBlock TextWrapping="Wrap" Text="{Binding WorkItemType}" d:LayoutOverrides="Width, Height" />
                    </Grid>
                </DataTemplate>
            </controls:Pivot.HeaderTemplate>
            <controls:Pivot.ItemTemplate>
                <DataTemplate>
                    <Grid>
                        <Controls:WorkItemsListControl></Controls:WorkItemsListControl>
                    </Grid>
                </DataTemplate>
            </controls:Pivot.ItemTemplate>
        </controls:Pivot>
        <Grid x:Name="ChartContainer" Grid.Row="1" Background="{StaticResource PhoneBackgroundBrush}" Opacity=".9" Visibility="Collapsed" MouseLeftButtonUp="ChartContainer_MouseLeftButtonUp">
            <Controls:WorkItemsOverviewChartControl  x:Name="WorkItemsChart" DrillDownEnabled="False"></Controls:WorkItemsOverviewChartControl>
        </Grid>
    </Grid>
</Page:BasePage>